// 属性面板的例子
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Fk.RoomElement
import "Pokeutil.js" as Pokeutil
Flickable {
   id: root
  anchors.fill: parent
  property var extra_data: ({ name: "", data: [] })
  property var balls: [0,0,0,0,0,0]
  property var playercards: []
  property var cardbuff: [0,0,0,0,0,0]
  property string picpath:AppPath+"/packages/jbs2/image/gem/"
  
  signal finish()

  Column {
    anchors.fill: parent
  RowLayout {
    id: detail
    anchors.fill: parent
    spacing:10
     
    Repeater {

      id: ballRepeater
          model: ["common","super","advanced","heart","advantage","master"]
          TokenItem {
            pwidth: 50
            pheight: 50
            
            total:balls[index]
            selectdnum:cardbuff[index]
            picsource: picpath+ "ball/"+modelData
 


          }
      }

  

  }
  ListView {
            id:innercardlistview
            orientation:Qt.Horizontal
            width: parent.width
            //anchors.fill: parent
            //anchors.left: levelcard.right
            //anchors.leftMargin: 20
            //Layout.alignment: Qt.AlignRight
            model: playercards

            spacing: 10
            clip: true
            height:200
            delegate:PokecardItem {

                name:""+ modelData
                picsource:picpath+"pokemon/"+modelData
                chosenInBox: fasle
                selectable: false

              }

            }
  
  }
 onExtra_dataChanged: {
    if (!extra_data.data) return;
    balls=extra_data.data[0];

    playercards=extra_data.data[1];
    cardbuff=extra_data.data[2];
    //console.log(playercards);
  }

}

